package ptaHhl;
import java.util.Scanner;

public class Fivefour {

	public static void main(String[] args) {
		Scanner input=new Scanner(System.in);
		while(input.hasNext())
		{
			double epsilon=0.0001;
			double step=0.0001;
			double num=input.nextDouble();
			if(num<0)
				System.out.println(Double.NaN);
			else {
				double i=0 ;
				for ( ;num - i*i >=epsilon && i*i<num; i+=step);
					System.out.printf("%.6f%n",i);
			}
		}

	}

}
